<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
    public function result_api($code,$msg=null,array $data=null){
        $result = [
            'code'  =>  $code,
            'msg'  =>  $msg  ? $msg: null,
            'data'  => $data ? $data: null,
        ];
        return response()->json($result);
    }


}
